<template>
  <el-card class="box-card-component" style="margin-left:8px;">
    <div slot="header" class="box-card-header">
      <img :src="authorInfo.author.authorBackImg">
    </div>
    <div style="position:relative;">
      <pan-thumb :image="authorInfo.author.authorAvatar" class="panThumb" />
      <mallki class-name="mallki-text" :text='authorInfo.author.authorName' />
      <div style="padding-top:35px;" class="progress-item">
        <span>{{this.avatar_jineng[0]}}</span>
        <el-progress :percentage="avatar_jineng[4]" />
      </div>
      <div class="progress-item">
         <span>{{this.avatar_jineng[1]}}</span>
        <el-progress :percentage="avatar_jineng[5]" />
      </div>
      <div class="progress-item">
        <span>{{this.avatar_jineng[2]}}</span>
        <el-progress :percentage="avatar_jineng[6]" />
      </div>
      <div class="progress-item">
        <span>{{this.avatar_jineng[3]}}</span>
        <el-progress :percentage="avatar_jineng[7]" />
      </div>
    </div>
  </el-card>
</template>

<script>
import { mapGetters } from 'vuex'

import PanThumb from '@/components/PanThumb'
import Mallki from '@/components/TextHoverEffect/Mallki'

export default {
  components: { PanThumb, Mallki },
  props:{ 
    text: {
      type:String,
      default:"哈哈哈"
    },
    avatar_Info: {
      type:Number,
     
    },
    avatar_jineng:{
      type:Array
    }

  },

  filters: {
    statusFilter(status) {
      const statusMap = {
        success: 'success',
        pending: 'danger'
      }
      return statusMap[status]
    },
 
  },
  data() {
    return {
      statisticsData: {
        article_count: 1024,
        pageviews_count: 1024
      },
    authorInfo:{}
    }
  },
  computed: {
    ...mapGetters([
      'name',
      'avatar',
      'roles'
    ])

    
    
  },
  methods: {
      //获取开发成员信息
    getAuthorInfo() {
    
      this.$store.dispatch('user/getDevelopers').then((res) => {
           console.log('获取开发人员信息')
           console.log(res)
           this.authorInfo=res[this.avatar_Info]
          console.log(this.authorInfo)
          })
    },
  },
  created() {
    this.getAuthorInfo()
 
    console.log('获取开发人员信息')
  
   
  }
}
</script>

<style lang="scss" >
.box-card-component{
  .el-card__header {
    padding: 0px!important;
  }
}
</style>
<style lang="scss" scoped>
.box-card-component {
  .box-card-header {
    position: relative;
    height: 220px;
    img {
      width: 100%;
      height: 100%;
      transition: all 0.2s linear;
      &:hover {
        transform: scale(1.1, 1.1);
        filter: contrast(130%);
      }
    }
  }
  .mallki-text {
    position: absolute;
    top: 0px;
    right: 0px;
    font-size: 20px;
    font-weight: bold;
  }
  .panThumb {
    z-index: 100;
    height: 70px!important;
    width: 70px!important;
    position: absolute!important;
    top: -45px;
    left: 0px;
    border: 5px solid #ffffff;
    background-color: #fff;
    margin: auto;
    box-shadow: none!important;
    ::v-deep .pan-info {
      box-shadow: none!important;
    }
  }
  .progress-item {
    margin-bottom: 10px;
    font-size: 14px;
  }
  // @media only screen and (max-width: 1510px){
  //   .mallki-text{
  //     display: none;
  //   }
  // }
}
</style>
